 WSE3.0̃CXg[
   
   TvR[hrh邽߂ɂ́AWSE 3.0 (MTOM`ŒʐM邽߂̃Cu)
   ʓrCXg[Kv܂B
   
   LURL_E[hāACXg[ĂB
   
   [Web Services Enhancements (WSE) 3.0 for Microsoft .NET]
   http://www.microsoft.com/downloads/details.aspx?familyid=018A09FD-3A74-43C5-8EC1-8D789091255D&displaylang=en

 wWebQƂ̒ǉxsꍇ̎菇

   wWebQƂ̒ǉxWebT[rXĂяoR[hꍇ́Aȉ̎菇KvłB

   1. ꂽ Reference.cs ̌pNX(SoapHttpClientProtocol)
      WSE3.0 ̃NX(WebServicesClientProtocol)ɕύXĂB
      
      yz
      
      ύXO) public partial class AttachmentService : System.Web.Services.Protocols.SoapHttpClientProtocol {
      ύX) public partial class AttachmentService : Microsoft.Web.Services3.WebServicesClientProtocol {
      
       ꂽNXuAttachmentServicev́AgpWSDL̓eɂĈقȂꍇ܂B
      
   2. Reference.cs  GetWebResponse\bhAGetReaderForMessage\bh ̃I[o[ChǉĂB
      (TvR[h65sځ`94s)
      
      ܂Aǉ\bhŎgpĂNX̖OԂǉĂB
      (TvR[h24sځ`27s)
      
      --------------------------------------------------------------------------------
      24:    using System.Net;
      25:    using System.IO;
      26:    using System.Xml;
      27:    using System.Text.RegularExpressions;
      
      `()`
      
      65:        protected override WebResponse GetWebResponse(WebRequest request)
      66:        {
      67:            //return base.GetWebResponse(request);
      68:
      69:            WebResponse webResponse = base.GetWebResponse(request);
      70:
      71:            webResponse.Headers["Content-Type"] = "text/xml";
      72:
      73:            return webResponse;
      74:        }
      75:
      76:        protected override XmlReader GetReaderForMessage(SoapClientMessage message, int bufferSize)
      77:        {
      78:            //return base.GetReaderForMessage(message, bufferSize);
      79:
      80:            string envelope = string.Empty;
      81:
      82:            using (StreamReader sr = new StreamReader(message.Stream))
      83:            {
      84:                Regex regex = new Regex("<soap.*:Envelope.*>.*</soap.*:Envelope>", RegexOptions.IgnoreCase);
      85:                Match match = regex.Match(sr.ReadToEnd());
      86:
      87:                if (match.Success)
      88:                {
      89:                    envelope = match.Value;
      90:                }
      91:            }
      92:
      93:            return XmlReader.Create(new StringReader(envelope));
      94:        }
      --------------------------------------------------------------------------------

